package leecode

func invertTree(root *TreeNode) (result *TreeNode) {
	if root == nil {
		return
	}
	result = root
	result.Left, result.Right = result.Right, result.Left
	invertTree(result.Left)
	invertTree(result.Right)
	return
}
